package com.ezia.coreservices.charging.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ezia.coreservices.charging.service.PoiService;
import net.sf.json.JSONObject;

@RestController
public class PoiController {
	
	@Autowired
	private PoiService poiService;
	
	@RequestMapping("v1.0/charging/vehicle/external/search/findbypoiname")
	public Object findByPoiName(@RequestBody String params) {
		JSONObject paramsDate = JSONObject.fromObject(params);
		//参数判断
		
		Map<String,Object> queryMap = new HashMap<String,Object>();
		//String rc="keyword+areaCode+pageSize+pageNo+scope+filter+coordType+userInfo+idType+idValue+longitude+latitude"+
		//"batterySOC+dischargeRate+chargeType";
		
		//String hc="respCode+respMsg+data+total+pageCount+pageNo+stationInfos";
		poiService.findByPoiName(queryMap);
		return "ok";
	}
	
	@RequestMapping("v1.0/charging/vehicle/external/search/findbylocation")
	public Object findbylocation(@RequestBody String params) {
		JSONObject paramsDate = JSONObject.fromObject(params);
		
		return "ok";
	}
	
	@RequestMapping("v1.0/charging/vehicle/external/search/getdynamicinfo")
	public Object getdynamicinfo(@RequestBody String params) {
		JSONObject paramsDate = JSONObject.fromObject(params);
		
		return "ok";
	}
		
}
